<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">   
<html xmlns="http://www.w3.org/1999/xhtml">   
<head>   
	<title>ThinkPHP示例: ajax分页操作</title>      
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
	<script type="text/javascript" src="__PUBLIC__/js/jquery.js"></script>
	<style type="text/css">
	*{ padding: 0; margin: 0;font-size:16px; font-family: "微软雅黑"} 
	div{ padding: 3px 20px;} 
	body{ background: #fff; color: #333;}
	h2{font-size:36px}
	div.result{border:1px solid #d4d4d4; background:#FFC;color:#393939; padding:8px 10px;float:auto; width:450px;margin:2px}
	a{text-decoration:none; color:gray;}
	a:hover{color:#F60;}
	div.page{border:1px solid #d4d4d4; background:#333;color:white; padding:5px 15px;float:auto; width:450px;margin:2px;text-align:right}
	</style>
</head>   
<body> 
	<h2>ThinkPHP示例：ajax分页操作</h2>
	<div class="result">
		可以更改IndexAction文件中param数组的<b>target</b>和<b>pagesId</b>参数查看和普通分页的区别。
	</div>
	<div id="content">
		<table cellpadding=3 cellspacing=5>
    <tr>
        <th><a href='/ltshop/index.php/Index/getList/order/id/sort/<?php if(($order['order']) == "mc"): echo ($order['sort']); else: ?>asc<?php endif; ?>'>ID</a><?php if(($order['order']) == "id"): ?><img src="../Public/style/images/sort_<?php echo ($order['sortImg']); ?>.gif" border="0"/><?php endif; ?></th>
        <th><a href='/ltshop/index.php/Index/getList/order/mc/sort/<?php if(($order['order']) == "mc"): echo ($order['sort']); else: ?>asc<?php endif; ?>' id='order'>商品名称</a><?php if(($order['order']) == "mc"): ?><img src="../Public/style/images/sort_<?php echo ($order['sortImg']); ?>.gif" border="0"/><?php endif; ?></th>
    </tr>
    <?php if(is_array($list)): $i = 0; $__LIST__ = $list;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><tr>
            <td style="border-bottom:1px solid silver;">
                <span style="color:gray"><?php echo ($vo["id"]); ?></span>
            </td>
            <td style="border-bottom:1px solid silver;">
                <span style="color:gray"><?php echo ($vo["mc"]); ?></span>
            </td>
        </tr><?php endforeach; endif; else: echo "" ;endif; ?>
    <tr></tr>
</table>
<div class="result page" id="page"><?php echo ($page); ?></div>

                
	</div> 
        <?php echo ($tm); ?>
</body>   
</html>